package com.tuo51.childcare.service;

import com.tuo51.childcare.domain.feed.Feeds;
import com.tuo51.core.domain.staffs.Staff;
import com.tuo51.evaluate.domain.childrens.Children;
import com.tuo51.foudation.query.base.PagerQuery;
import org.springframework.data.domain.Page;

import java.util.List;

import static com.tuo51.foudation.constant.FeedsConstant.*;

/**
 * @Describle This Class Is
 * @Author ZengMin
 * @Date 2018/11/9 11:00
 * @Company Matt
 */
public interface FeedsService {

    enum FeedsType{
        EvaluateRecord(EVALUATE_RECORD, "心理行为发育测评报告"),
        BizRecord_GrowupEnv(BIZRECORD_GROWUPENV, "家庭养育环境"),
        FeedParentMemo(PARENT_MEMO, "养育感悟"),
        FeedDailyTask(DAILY_TASK, "每日任务"),
        FeedGrowRecord(GROW_RECORD, "成长记录"),
        FeedDailyObserve(DAILY_OBSERVE, "一日观察");

        private int type;
        private String typeVal;
        private FeedsType(int type, String typeVal){
            this.type = type;
            this.typeVal = typeVal;
        }

        public int getType() {
            return type;
        }

        public String getTypeVal() {
            return typeVal;
        }
    }

    Page<Feeds> getAllByChildrens(String uid, String filters, PagerQuery pagerQuery);

    Feeds getOne(String uid, String feedId);

    Feeds getLatestFeeds(String uid, FeedsType type);

    Object getDetailEvaluate(String linkId);
    Object getDetailObservate(String linkId);
    Object getDetailGrowRecord(String linkId);

    Object getLinkedObjects(String uid, Feeds feed, PagerQuery pagerQuery);

    Feeds postFeeds(Staff parent, Children children, String title, String content, String resources, Integer mediaType, FeedsType type, String linkedId);

    List<Feeds> postFeeds(Children children, String title, String content, String resources, Integer mediaType, FeedsType type, String linkedId);
}
